package com.ht.module.ai.controller;

import com.ht.config.log.annotation.SysLog;
import com.ht.module.ai.entity.AiChatSession;
import com.ht.module.ai.service.AiChatSessionService;
import com.ht.util.JsonResult;
import com.ht.util.Pager;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.ht.module.ai.entity.AiChatMessage;
import com.ht.module.ai.service.AiChatMessageService;
import com.ht.util.*;

import javax.annotation.Resource;
import javax.validation.Valid;


/**
 * <p>
 * AI聊天历史消息表 前端控制器
 * </p>
 *
 * @author hejialun
 * @since 2025-06-09
 */
@RestController
@RequestMapping("/ai-chat-message")
public class AiChatMessageController {


    @Resource
    private AiChatMessageService chatMessageService;


    @GetMapping("/findMessageBySessionId/{id}")
    @ApiOperation(value = "查询出当前回话的消息")
    @SysLog(msg = "查询出当前回话的消息")
    public JsonResult findMessageBySessionId(@PathVariable String  id){
        return JsonResult.success(chatMessageService.findMessageBySessionId(id));
    }


}
